package com.flyway.service.impl;/**
 * @Author: xupx
 * @Date: 2019/11/15
 */

import com.flyway.dao.UsersMapper;
import com.flyway.pojo.Users;
import com.flyway.pojo.sql.SqlLog;
import com.flyway.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @program: flyway->UserServiceImpl
 * @description: 用户服务类
 * @author: xupx
 * @create: 2019-11-15 10:58
 **/
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UsersMapper usersMapper;
    @Override
    public Users findUserById(Integer userId) {
        return usersMapper.selectByPrimaryKey(userId);
    }

    @Override
    public Users findUserByUserName(String username) {
        return usersMapper.findUserByUserName(username);
    }
    @Override
    public void insertSql(SqlLog sqlLog) {
        usersMapper.insertSelectiveSql(sqlLog);
    }
}
